﻿@model MobileWeb.Models.SearchModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section pageTitle 
{
    @Html.Partial("_PartialPageTitle")
}

<div>
    @using (Html.BeginForm()){
        <table id="paramInput">
            <tr>
                <th>
                    Površina/m2
                </th>
                <th>
                    Kat
                </th>
                <th>
            
                </th>
            </tr>
            <tr>
                <td>
                    @Html.DropDownListFor(model => model.SelectedArea, new SelectList(Model.Areas,"Id","Name"))    
                </td>
                <td>
                    @Html.DropDownListFor(model => model.SelectedFloor, new SelectList(Model.Floors,"Id","Name"))
                </td>
                <td>
                    <input type="submit" value="Pretraži" />
                </td>
            </tr>
        </table>
    }
    
</div>
<div>
    <table id="apartments">
        <thead>
            <tr>
                <th>
                    Površina
                </th>
                <th>
                    Kat
                </th>
                <th>
                    Šifra        
                </th>
            </tr>
        </thead>
        @foreach (var apartment in Model.Apartments) {             
                <tr>
                    <td>
                        <a href="/Detalji/Stan/@apartment.Code">
                            @apartment.Area
                        </a>
                    </td>
                    <td>
                        <a href="/Detalji/Stan/@apartment.Code">
                            @apartment.Floor
                        </a>
                    </td>
                    <td>
                        <a href="/Detalji/Stan/@apartment.Code">
                            @apartment.Code
                        </a>
                    </td>
                </tr>
        }
    </table>
</div>

@using (Html.BeginForm()) {
    
   
    <br />
    <br />
    
       
}



